package pages;

import org.openqa.selenium.WebElement;


import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import utils.BaseAction;

public class MainPage{
	AndroidDriver driver;
	BaseAction action;
	public MainPage(AndroidDriver driver) {
		this.driver=driver;
		action=new BaseAction(driver);
	}
	
	public WebElement btn_personalInformation() {
		return driver.findElement(AppiumBy.id("njust.dzh.fitnesssystem:id/person_data"));
	}
	
	public void clickPersonalInformation() throws InterruptedException {
		action.click(this.btn_personalInformation());
	}
	
	public PersonPage clickPersonalInformationSuccess() throws InterruptedException {
		clickPersonalInformation();
		return new PersonPage(driver);
	}
	
}
